﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace Passwords.Controls
{
    public class PasswordBinder : FrameworkElement
    {

        public bool IsValid
        {
            get { return LoginBox != null && NewPasswordBox != null && ConfirmPasswordBox != null; }
        }
        

        public PasswordBox LoginBox
        {
            get { return (PasswordBox)GetValue(LoginBoxProperty); }
            set { SetValue(LoginBoxProperty, value); }
        }

        public static readonly DependencyProperty LoginBoxProperty =
            DependencyProperty.Register("LoginBox", typeof(PasswordBox), typeof(PasswordBinder), new UIPropertyMetadata(null));





        public PasswordBox NewPasswordBox
        {
            get { return (PasswordBox)GetValue(NewPasswordBoxProperty); }
            set { SetValue(NewPasswordBoxProperty, value); }
        }

        public static readonly DependencyProperty NewPasswordBoxProperty =
            DependencyProperty.Register("NewPasswordBox", typeof(PasswordBox), typeof(PasswordBinder), new UIPropertyMetadata(null));




        public PasswordBox ConfirmPasswordBox
        {
            get { return (PasswordBox)GetValue(ConfirmPasswordBoxProperty); }
            set { SetValue(ConfirmPasswordBoxProperty, value); }
        }

        public static readonly DependencyProperty ConfirmPasswordBoxProperty =
            DependencyProperty.Register("ConfirmPasswordBox", typeof(PasswordBox), typeof(PasswordBinder), new UIPropertyMetadata(null));


    }
}
